<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<meta name="format-detection" content="telephone=no">
	<title>{$site_seo_title}</title>
	<base id="headbase" href="__TMPL__/seatsel/" />
	{include file="./tplnew/public/css_weui.html" /}
	<link rel="stylesheet" href="css/style.css?{$suffix}" />
	<link rel="stylesheet" type="text/css" href="__STATIC__/Zz22zzUI/addon/niftymodal/css/niftymodal.css">
</head>
<body class="body-fixed-bottom" ontouchstart>

<!--主体-->
<header class="wenew-header wenew-header-green">
	<a href="{:url('seatsel/myOrder/index')}" class="wenew-header-icon-back"><i class="iconfontzz icon-fanhuijiantou w15"></i>返回</a>
	<div class="wenew-header-title">订单详情</div>
</header>

{if condition="$orderInfo['delivery_mode'] eq 1"}
<div class="wy-media-box weui-media-box_text address-select">
	<div class="weui-media-box_appmsg">
		<div class="weui-media-box__hd proinfo-txt-l" style="width:20px;"><span class="promotion-label-tit"><img src="images/icon_nav_city.png" /></span></div>
		<div class="weui-media-box__bd">
			<a href="address_list.html" class="weui-cell_access">
				<h4 class="address-name"><span>杜杰</span><span>13854652512</span></h4>
				<div class="address-txt">宿迁市洋河新区电商产业园105号</div>
			</a>
		</div>
		<div class="weui-media-box__hd proinfo-txt-l" style="width:16px;"><div class="weui-cell_access"><span class="weui-cell__ft"></span></div></div>
	</div>
</div>
{/if}

<div class="wy-media-box weui-media-box_text">
	<div class="weui-media-box__bd">
		<div class="weui-media-box_appmsg ord-pro-list">
			<div class="weui-media-box__hd"><a href="{:url('seatsel/product/detail', ['pid'=>$productInfo['id']])}"><img class="weui-media-box__thumb" src="{$productInfo['picurl']}" alt=""></a></div>
			<div class="weui-media-box__bd">
				<h1 class="wefix-media-box__we_title ord-pro-link"><a href="{:url('seatsel/product/detail', ['pid'=>$productInfo['id']])}">{$productInfo['name']}</a></h1>
				<ul class="show-cloord-time">
					<li><i><img src="images/details-time.png"></i><span class="address-time">{$specInfo['name']}</span></li>
					<li><i><img src="images/details-location.png"></i><span class="address-location">{$productInfo['place']}</span></li>
				</ul>
			</div>
		</div>
	</div>
</div>

<!-- 二维码 -->
{if condition="$orderInfo['trade_status'] eq 2"}
<div class="weui-cells order-info">
	<div class="weui-cell tac">
		订单二维码核销：
	</div>
	<div class="weui-cell">
<!--
测试核销专用，请无视。。。<br>
核销URL：{$verifyUrl}
*长按二维码，保存电子凭证到手机
-->
		<div id="J_urlQrcodeCanvas" style="width:120px;"></div>
	</div>
	{if condition="$productInfo['verify_code']"}
	<div class="weui-cell">
		核销码核销：
	</div>
	<div class="weui-cell">
		<a href="{:url('seatsel/myOrderFinish/codeVerify', ['orderId'=>$orderId])}" class="weui-btn weui-btn_plain-primary weui-btn_mini J_layerDialog" data-tip="请输入核销暗号">立即核销</a>
	</div>
	{/if}
</div>
{/if}

{if condition="$orderInfo['trade_status'] eq 3"}
<div class="weui-cells order-info">
	<div class="weui-cell">
		<div class="weui-cell__bd"><a href="{:url('seatsel/myOrder/doReceipt', ['orderId'=>$orderId])}" class="mui-btn mui-btn-success mui-btn-outlined J_layerConfirm" data-tip="确认收货吗?">确认收货</a></div>
	</div>
</div>
{/if}

<?php
	$productTotalPrice = $productDeliveryPrice = $orderTotalPrice = 0; //价格
	$seatNum = 0; //数量
?>
<div class="weui-panel">
	<div class="weui-panel__hd">商品</div>
	<div class="weui-panel__bd">
		<div class="weui-media-box weui-media-box_appmsg">
			<div class="details-seat">
				{volist name="orderProductList" id="vo"}
				<?php
					$seatNum++;
					$productFee = $vo['real_price'];
					
					$productTotalPrice += $productFee;
					$productDeliveryPrice += $deliveryFee;
				?>
					<input type="hidden" name="ids[]" value="{$vo['id']}" />
					<span>{$vo['region_name']}{$vo['pai']}排{$vo['zuo']}座【{$vo['real_price']}元】</span>
				{/volist}
			</div>
		</div>
	</div>
	<div class="weui-panel__ft">
		<div class="weui-cell weui-cell_access weui-cell_link">
			<div class="weui-cell__bd">
				<dl class="flow-dis-hj-dl">
					<dd><span>共 <strong class="ticket-total">{$seatNum}</strong> 张</span><span>合计：<strong class="ticket-payment">{$productTotalPrice}</strong>元</span></dd>
				</dl>
			</div>
		</div>
	</div>
</div>

<div class="weui-panel">
	<div class="weui-panel__bd">
		<div class="weui-media-box weui-media-box_small-appmsg">
			<div class="weui-cells">
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">配送方式：</span>{$orderInfo['delivery_mode_show']}</p>
					</div>
				</div>
				{if condition="$orderInfo['delivery_mode'] eq 2"}
					<div class="weui-cell weui-cell_access">
						<div class="weui-cell__bd weui-cell_primary">
							<p class="font-14"><span class="mg-r-10">自提点：</span>{$addressInfo['name']}({$addressInfo['address']} 电话：{$addressInfo['tel']})</p>
						</div>
					</div>
				{/if}
			</div>
		</div>
	</div>
</div>

<div class="weui-panel">
	<div class="weui-panel__bd">
		<div class="weui-media-box weui-media-box_small-appmsg">
			<div class="weui-cells">
				{volist name="leavemess_fields" id="vo"}
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">{$vo['name']}：</span>{$orderInfo[$vo['flag']]}</p>
					</div>
				</div>
				{/volist}
			</div>
		</div>
	</div>
</div>

<div class="weui-panel">
	<div class="weui-panel__bd">
		<div class="weui-media-box weui-media-box_small-appmsg">
			<div class="weui-cells">
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">商品金额</span><span class="fr txt-color-red">￥<em class="num">{$orderInfo['product_fee']}</em></span></p>
					</div>
				</div>
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">运费</span><span class="fr txt-color-red">￥<em class="num">{$orderInfo['delivery_fee']}</em></span></p>
					</div>
				</div>
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">抵扣金额</span><span class="fr txt-color-red">￥<em class="num">{$orderInfo['voucher_fee']}</em></span></p>
					</div>
				</div>
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">应付金额</span><span class="fr txt-color-red">￥<em class="num">{$orderInfo['total_fee']}</em></span></p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="weui-panel">
	<div class="weui-panel__bd">
		<div class="weui-media-box weui-media-box_small-appmsg">
			<div class="weui-cells">
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">订单编号：</span>{$orderInfo['order_no']}</p>
					</div>
				</div>
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">创建时间：</span>{$orderInfo['create_time_show']}</p>
					</div>
				</div>
				{if condition="$orderInfo['trade_status'] eq 2"}
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">支付时间：</span>{$orderInfo['pay_time_show']}</p>
					</div>
				</div>
				{/if}
				<div class="weui-cell weui-cell_access">
					<div class="weui-cell__bd weui-cell_primary">
						<p class="font-14"><span class="mg-r-10">订单状态：</span>{$orderInfo['trade_status_show']}</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="weui-panel weui-panel_access wefix-panel_tit">
	<div class="weui-panel__hd">订单售后</div>
	<div class="weui-panel__bd">
		{if condition="$orderInfo['refund_status'] != 1"}
		<div class="weui-cell">
			<div class="weui-cell__bd">
			{if condition="$orderInfo['refund_status'] eq 2"}
				{$orderInfo['refund_status_show']}
			{elseif condition="$orderInfo['refund_status'] eq 8" /}
				{$orderInfo['refund_status_show']}
				<br>退款{$vo['refund_fee']}元
			{elseif condition="$orderInfo['refund_status'] eq 9" /}
				{$orderInfo['refund_status_show']}
				<br>已全额退款
			{/if}
			</div>
		</div>
		{/if}
		{if condition="$orderInfo['trade_status'] == 2 && $orderInfo['refund_status'] == 1"}
			<div class="weui-cell">
				<div class="weui-cell__bd">
					<a href="{:url('seatsel/myOrderRefund/applyRefund', ['orderId'=>$orderId])}" class="weui-btn wenew-btn_plain_red weui-btn_mini J_layerWapDialog" data-tip="我要退款">我要退款</a>
				</div>
			</div>
		{/if}
		{volist name="refundList" id="vo"}
		<div class="weui-cell">
			<div class="weui-cell__bd">
				<div class="fr">
					<span class="c-orange">{$vo['status_show']}</span>
				</div>
				<div>
					<span class="mg-r-10">退款申请时间：</span>{$vo['create_time_show']}
				</div>
				<div class="mb5">
					<span class="mg-r-10">退款理由：</span>{$vo['apply_reason']}
				</div>
				<div>
					<ul class="zzui-picture">
					{volist name="refundPictureGroup[$vo['id']]" id="vo2"}
						<li><a href="{$vo2['picurl']}" target="_blank"><img src="{$vo2['picurl']}" /></a></li>
					{/volist}
					</ul>
				</div>
			</div>
		</div>
		{/volist}
	</div>
</div>

<div class="weui-panel">
	<div class="weui-panel__bd">
		<div class="weui-media-box weui-media-box_small-appmsg">
			<div class="weui-cells">
				<div class="weui-cell weui-cell_access">
					{if condition="$orderInfo['trade_status'] eq 1"}
						<div>
							<a href="{:url('seatsel/myOrder/doCancel', ['orderId'=>$orderId])}" class="weui-btn weui-btn_primary weui-btn_mini J_layerConfirm" data-tip="确认取消订单吗？">取消订单</a>
						</div>
					{/if}
				</div>
			</div>
		</div>
	</div>
</div>

<div class="support-wrap">
	<div class="support-copyright">
		<a href="javascript:;" class="yz-txt">昆山论坛技术支持</a>
	</div>
</div>

<!-- =====底部浮动框===== -->
{if condition="$orderInfo['trade_status'] == 1"}
<div class="hotel-bar-submit">
	<span>总额</span>
	<strong>￥{$orderInfo['total_fee']}</strong>
	<span class="hotel-pay-detail" style="display:none;">明细<i class="mui-icon mui-icon-arrowright"></i></span>
	{if condition="$isNeedForward"}
		<span class="hotel-submit-btn J_forward">支付</span>
	{else /}
		<span class="hotel-submit-btn md-trigger" data-modal="modal-pay">支付</span>
	{/if}
</div>

<!-- 支付弹出窗口 -->
<div class="md-modal md-modal-transform md-effect-1" id="modal-pay" style="width: 80%;">
	<div class="md-box">
		<div class="md-title">选择支付方式</div>
		<div class="md-content pay-box">
			<div class="weui-cells">
				<a class="weui-cell weui-cell_access" href="{:url('seatsel/productAlipayTrade/doAlipay', ['orderId'=>$orderId])}">
					<div class="weui-cell__hd"><img src="images/pay/alipay.png" width="20" height="20"></div>
					<div class="weui-cell__bd">
						<p>支付宝</p>
					</div>
					<div class="weui-cell__ft"></div>
				</a>
				<a class="weui-cell weui-cell_access" href="/index.php?s=/seatsel/productWxpay/doJsapi/orderId/{$orderId}">
					<div class="weui-cell__hd"><img src="images/pay/wxpay.png" width="20" height="20"></div>
					<div class="weui-cell__bd">
						<p>微信</p>
					</div>
					<div class="weui-cell__ft"></div>
				</a>
			</div>
			
			<input type="hidden" id="J_paytype" value="1" style="display: none;" />
			<button type="button" class="pay-button J_doPay" style="display: none;">确认无误去支付</button>
		</div>
		<span class="md-setwin"><a class="md-ico md-close1 md-close" href="javascript:;"></a></span>
	</div>
</div>
{/if}
<!-- =====底部浮动框===== -->

<!-- =====分享===== -->
<div id="J_cover">
	<img src="images/share_cover.png" />
</div>
<!-- =====分享===== -->

<?php
$layerStyle = 2;
?>
{include file="./tplnew/public/script_weui.html" /}

{include file="./tplnew/seatsel/my_order_detail_share.html" /}

<!-- 模态框 -->
<script type="text/javascript" src="__STATIC__/Zz22zzUI/addon/niftymodal/js/modalEffects.jquery.js"></script>

<!-- 生成二维码 -->
<script type="text/javascript" src="__STATIC__/Zz22zzUI/addon/qrcode/jquery.qrcode.min.js"></script>
<script type="text/javascript">
jQuery('#J_urlQrcodeCanvas').qrcode({
	text	: "{$verifyUrl}",
	width: 120,
	height: 120,
});
</script>

<script type="text/javascript">
//查看留言
$('.J_show_message').on("click", function(){
	var id = $(this).data('id');
	
	var html;
	if(id){
		html = $('#J_message_'+id).html();
	}else{
		html = $('.J_message').html();
	}
	//console.log(html);
	layer.open({
		 type: 1,
		 closeBtn: true,
		 shift: 2,
		 offset: 'b',
		 area: ['100%', 'auto'],
		 title: '查看留言',
		 content: html
	});
});
</script>

<script type="text/javascript">
//强制转发
$('.J_forward').on("click", function(){
	$('#J_cover').css('display', 'block');
});
$('#J_cover').click(function(){
	$('#J_cover').css('display', 'none');
});

//分享后操作
var url_share = "{:url('seatsel/myOrder/doShare', ['orderId'=>$orderId])}";
function afterShare(){
	$.get(url_share, '', function(ret){
		if(ret.code == 1){
			Wei.Util.wapTipNew({msg: ret.msg, icon: 1, time: ret.time,});
		}else if(ret.code == 0){
			Wei.Util.wapTipNew({msg: ret.msg, icon: 2, time: ret.time,});
		}
		
		Wei.Util.readyToJump(ret);
	},'json');
}
</script>

<div class="layer_notice" style="display: none;">
	<a href="{$productInfo['eject_link']}">
		<img src="{$productInfo['eject_picurl']}" />
		<span class="cont">{$productInfo['eject_cont']}</span>
	</a>
</div>

<script type="text/javascript">
var isShowEject = "{$isShowEject}";
if(isShowEject == 1){
	layer.open({
		type: 1,
		shade: false,
		title: false, //不显示标题
		area: ['60%'], //宽高
		content: $('.layer_notice'), //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
		cancel: function(){
			//layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', {time: 5000, icon:6});
		}
	});
}
</script>

</body>
</html>